package common.util.mail;

public class MailSender {
	public static boolean sendLookPassword(String toUser,String uuid) {
		try {
			Mail mail = new Mail();
			mail.setAddress(toUser, Mail.TO);
			        // 设置发送邮箱
			mail.setFromAddress("shanming088@163.com");
			mail.setSMTPHost("smtp.163.com", "shanming088@163.com","huyakuaile.914");
			mail.setSubject("主题测试");
			//mail.setTextBody("testBody");
			mail.setHtmlBody("<B>亲爱的用户,你在佳人网站申请找回密码,点击下面的链接重新设置密码.<span style='color:red;'>如果不是您本人操作,请忽略此邮件!</span></B>" +
					"<br><B><a href='http://127.0.0.1:8080/customerDefault/linkLookPassword.aspx?uuid="+uuid+"'>修改密码</B><br>" +
					"如果链接无法点击,请复制下面的地址到浏览器地址栏打开链接<br>http://127.0.0.1:8080/customerDefault/linkLookPassword.aspx?uuid="+uuid);
			//mail.setFileAttachment("C:/测试附件.docx");
			mail.sendBatch();
			return true;
		} catch (Exception e) {
			e.printStackTrace();
			return false;
		}
	}
	public static void main(String[] a){
		sendLookPassword("shanming088@163.com","2324323423");
	}
}
